# coding:utf-8
'''
	关于JAJADIY-Plugin
	汉中库得网络科技
	电子信箱：yyc1030@qq.com
'''
from PySide2 import QtGui
from PySide2 import QtWidgets

class AboutAction(QtWidgets.QAction):
	def __init__(self, app):
		self.app = app
		icon = QtGui.QIcon(app.rootPath + "/icon/about.png")
		super(AboutAction, self).__init__(icon, "关于", app.mainWindow)
		self.triggered.connect(self.about)
		
	# 关于JAJADIY
	def about(self):
		box = QtWidgets.QMessageBox(self.app.mainWindow)
		box.setWindowTitle("关于")
		box.setWindowIcon(self.app.logo)
		box.setText('''
				<p align="center">免费开源·加载迅速·高效便捷·持续更新</p>
				<p>版 本：JAJADIY-Plugin %s</p>
				<p>官 网：<a href='https://gitee.com/centmagic/jajadiy-plugin'>https://gitee.com/centmagic/jajadiy-plugin</a></p>
				<p align='center'>Copyright (C) 2021 - 现在 汉中库得网络科技</p>
			''' % self.app.version)
		box.exec_()